package com.fileutils;

import org.json.JSONArray;
import org.json.JSONException;
import java.util.*;

public class JsonUtils {
    public static ArrayList<ArrayList<String>> getPersonListMap1(String jsonstring) {
        ArrayList<ArrayList<String>> list = new ArrayList<>();
        try {
            JSONArray jsonArray = new JSONArray(jsonstring);
            for(int i=0;i<jsonArray.length();i++){
                ArrayList<String> mItemArray=new ArrayList<>();
                JSONArray itemJson = (JSONArray) jsonArray.get(i);
                for(int itemCount=0;itemCount<itemJson.length();itemCount++){
                    mItemArray.add(itemJson.get(itemCount).toString());
                }
                list.add(mItemArray);
            }
        } catch (JSONException e) {
            e.printStackTrace();
        }
        return list;
    }
}
